Skip to content

feat: v2.2 API surface — retrieveTrace, processFromUrl, deprecate error field#111

Merged
rferreira merged 2 commits into
mainfrom
v2.2-surface
May 2, 2026
Merged

feat: v2.2 API surface — retrieveTrace, processFromUrl, deprecate error field#111
rferreira merged 2 commits into
mainfrom
v2.2-surface

Conversation

@rferreira

Copy link
Copy Markdown
Contributor

Summary

  • Adds retrieveTrace(String id)Optional<ScaniiTraceResult>: calls GET /v2.2/files/{id}/trace, returns empty on 404. Preview endpoint per v2.2 spec.
  • Adds processFromUrl(URI location) / processFromUrl(URI location, Map<String,String> metadata): submits a remote URL for synchronous processing via POST /v2.2/files with a location multipart text field.
  • New ScaniiTraceResult model with inner ScaniiTraceEvent (timestamp, message); wired into the custom JSON parser.
  • Deprecates ScaniiProcessingResult.getError() / setError() (@Deprecated(since = "8.1.0")); will be removed in a future major version.
  • Version bumped to 8.1.0 in pom.xml and README.

Test plan

  • testRetrieveTrace — process a file, retrieve its trace, assert ≥1 event with non-null timestamp and message
  • testRetrieveTraceUnknownId — assert retrieveTrace("doesnotexist") returns Optional.empty()
  • testProcessFromUrl — submit http://localhost:4000/static/eicar.txt, assert 201 + non-null id
  • All existing tests still pass (CI: Java 21 + 25, ubuntu/macos/windows via scanii-cli setup-cli-action)

🤖 Generated with Claude Code

rferreira and others added 2 commits May 1, 2026 17:25
… error field

- ScaniiTraceResult model (resourceId, List<ScaniiTraceEvent>) wired into JSON parser
- retrieveTrace(String id): GET /v2.2/files/{id}/trace, returns Optional<ScaniiTraceResult>
- processFromUrl(URI location): POST /v2.2/files with location multipart field, returns ScaniiProcessingResult
- ScaniiProcessingResult.getError/setError deprecated since 8.1.0
- Three integration tests: testRetrieveTrace, testRetrieveTraceUnknownId, testProcessFromUrl
- pom.xml bumped to 8.1.0; README and CHANGELOG updated

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ne before publish

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@rferreira
rferreira merged commit ce0473e into main May 2, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant